package com.ruoyi.business.sundry.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.business.base.JoBaseService;
import com.ruoyi.business.base.PageParam;
import com.ruoyi.business.sundry.domain.JbProductRecipe;
import com.ruoyi.business.sundry.domain.vo.JbProductRecipeVo;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 商品配方Service接口
 *
 * @author ruoyi
 * @date 2024-10-11
 */
public interface JbProductRecipeService extends JoBaseService<JbProductRecipe>
{
    /**
     * 组合查询分页数据
     *
     * @param pageParam
     * @param jbProductRecipe
     * @return
     */
    IPage<JbProductRecipeVo> pageList(PageParam pageParam, JbProductRecipe jbProductRecipe);

    /**
     * 同步商品表
     */
    Boolean synchronizationGoods();

    /**
     * 详情，待分配和原料的关系表
     *
     * @param id
     * @return
     */
    JbProductRecipeVo getDetails(Long id);

    /**
     * 更新培训，和分配和原料关系
     *
     * @param jbProductRecipeVo
     * @return
     */
    Boolean editInfo(JbProductRecipeVo jbProductRecipeVo);

    /**
     * 添加
     *
     * @param jbProductRecipeVo
     * @return
     */
    Boolean addInfo(JbProductRecipeVo jbProductRecipeVo);

    /**
     * 更新原料价格，同时更新配置实时成本
     *
     * @param materialList
     * @return
     */
    Boolean updateRealTimeCost(Map<Long, BigDecimal> materialList);
}
